<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--通过为视口（viewport）设置 meta 属性为 user-scalable=no 可以禁用其缩放（zooming）功能。-->
    <!--这样禁用缩放功能后，用户只能滚动屏幕，就能让你的网站看上去更像原生应用的感觉。-->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Boot-Search</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->

    <link href="http://localhost:8080/search/css/main.css" rel="stylesheet">
    <script src="http://localhost:8080/search/js/template-web.js"></script>
</head>
<body>
    <!--art-template-->
    <!--禁用html 片段转义成字符串: #或者@  {{#$value.content}} {{@$value.title}} {{@total}}-->
    <script id="content_template" type="text/html">
        <div class="nums">
            <span class="nums_text">本次为您找到相关结果约{{total}}个</span>
        </div>
        <!--data : 是pageInfo中的data-->
        {{each data}}
        <div id="{{$value.docID}}">
            <h3>
                <a href={{$value.url}} target="_blank">{{@$value.title}}</a>
            </h3>
            <div>
                <span>{{$value.docID}}</span>
                {{#$value.content}}
            </div>
            <div>
                <a href="" target="_blank">{{$value.url}}</a>
            </div>
        </div>
        {{/each}}
        <!--data为template()传入的数据-->
        <!--{{$data}}-->
    </script>

    <!--<h1>你好，世界！</h1>-->
    <div class="container-fluid">
        <div class="row">
            <nav class="navbar navbar-default navbar-fixed-top">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-2">
                            <div class="navbar-header">
                                <a class="navbar-brand" href="#">
                                    <img class="img_header" alt="SEARCH" src="http://localhost:8080/search/image/quicksearchbox.png">
                                </a>
                                <ul class="nav navbar-nav navbar-right">
                                    <li><a href="#">SEARCH</a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="input-group">
                                <input id="value" type="text" class="form-control navbar-btn" placeholder="Search for...">
                                <span class="input-group-btn">
                                    <button id="search_btn" class="btn btn-default navbar-btn" type="button">Go!</button>
                                </span>
                            </div><!-- /input-group -->
                        </div>
                        <div class="col-md-2"></div>
                    </div>
                </div>
            </nav>
        </div>

        <div class="row">
            <div class="col-md-2"></div>
            <div class="col-md-8">

                <div id="content_wrapper">
                    <div id="content"></div>
                </div>
                <!--bootstrap自带的Pagination-->
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                    </ul>
                </nav>
                <!--jquery.pagination-->
                <!--<div id="pagination"></div>-->
            </div>
            <div class="col-md-2"></div>
        </div>
    </div>

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <!--jquery.pagination 分页插件-->
    <!--<script src="http://localhost:8080/search/js/jquery.pagination.js"></script>-->
    <!--基于bootstrap的分页插件-->
    <script src="http://localhost:8080/search/js/bootstrap-paginator.min.js"></script>
    <script src="http://localhost:8080/search/js/main.js"></script>
</body>
</html>